import { _decorator, Component, Node } from 'cc';
import { BaseComponent } from '../../Manager/UIManager/BaseComponent';
import { GAME_POP, GAME_SCENE, SOUND_TYPE } from '../../Data/GlobalData';
const { ccclass, property } = _decorator;

@ccclass('LoginScene')
/**
 * 创建一个通用角色
 * 写一个通用框架
 */
export class LoginScene extends BaseComponent {

    protected Init(): void {
        app.logManager.info("游戏首页初始化")
    }
    protected OnShow(): void {
        app.logManager.info("游戏首页显示")
    }

    /**
     * 点击开始游戏
     */
    private StartClick() {
        app.logManager.info("点击开始游戏")
        app.uiManager.ShowUI(GAME_SCENE.GameScene);
    }

    /**
     * 更新体力
     */
    private UpdatePower() {
        app.logManager.info("更新体力")
    }

    /**
     * 更新金币
     */
    private UpdateGold() {
        app.logManager.info("更新金币")
    }

    /**
     * 商店点击
     */
    private ShopClick() {
        app.logManager.info("商店点击")
    }

    /**
     * 皮肤点击
     */
    private SkinClick() {
        app.logManager.info("皮肤点击")
        app.audioManager.PlayEffect(SOUND_TYPE.Button);
        app.popManager.ShowPop(GAME_POP.PopSkin);
    }

    /**
     * 签到点击
     */
    private SignInClick() {
        app.logManager.info("签到点击")
    }

    /**
     * 点击任务
     */
    private TaskClick() {
        app.logManager.info("点击任务")
    }

    /**
     * 点击设置
     */
    private SettingClick() {
        app.logManager.info("点击设置")
        app.audioManager.PlayEffect(SOUND_TYPE.Button);
        app.popManager.ShowPop(GAME_POP.PopSet)
    }

}


